// 引入所有全局组件
import SvgIcon from './SvgIcon.vue'
// 全部导入elementPlus图标组件
import * as ElementPlusIconsVue from '@element-plus/icons-vue'
const allGloablComponent: any = { SvgIcon }

// 导出插件对象
export default {
  install(app: any) {
    Object.keys(allGloablComponent).forEach((key) => {
      app.component(key, allGloablComponent[key])
    })
    // elementplus图标注册全局组件
    for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
      app.component(key, component)
    }
  }
}
